<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title></title>
    <meta name="decorator" content="ani"/>
    <script type="text/javascript">

        $(document).ready(function() {
            $("#inputForm").find("select").each(function () {
                if ($(this).attr("data-value") != '' && $(this).attr("data-value") != undefined) {
                    $(this).val($(this).attr("data-value"));
                }
            });
        });
        function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if(!isValidate){
                jp.error("必填项不能为空，请检查！");
                return false;
            }else{
                jp.loading();
                jp.post("${ctx}/act/process/save",$('#inputForm').serialize(),function(data){
                    if(data.success){
                        jp.getParent().refresh();
                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                        parent.layer.close(dialogIndex);
                        jp.success(data.msg)
                    }else{
                        jp.error(data.msg);
                    }
                })
            }

        }
    </script>
</head>
<body class="bg-white">
<form:form id="inputForm" class="form-horizontal">
    <form:hidden path="id"/>
<div class="form-group">
    <label class="col-sm-2 col-md-1 control-label"><font color="red">所属区域：</font></label>
    <div class="col-sm-10 col-md-2">
        <select id="role" name="role.id" class="form-control m-b" data-value="${role.id}">
            <option value=""></option>
            <c:forEach items="${fns:getSelectList('','','sys_role','name','' )}" var="dict">
                <option value="${dict.id}">${dict.name}</option>
            </c:forEach>
        </select>
    </div>
</div>
</form:form>
</body>
</html>